import { redirect } from 'next/navigation';
import { aboutPagesApi, AboutPagesResponse } from './api';
import { Button } from 'antd';
import Link from 'next/link';
import { FC } from 'react';

type AboutParmas = {
	params: string;
};

// #----------- 上: ts类型定义 ----------- 分割线 ----------- 下: JS代码 -----------

const AboutPagesServe: FC = async () => {
	const { data } = await aboutPagesApi();
	console.log(111);
	return (
		<>
			<div>
				<h1>AboutPages</h1>
				<Button>
					<Link href={'/about'}>back</Link>
				</Button>
				{data.map((v) => {
					return <div key={v.name}>{v.name}</div>;
				})}
			</div>
		</>
	);
};

export default AboutPagesServe;
